#include "KLTcpServer.h"
#include <iostream>

int main()
{
    std::cout << "Starting TCP server..." << std::endl;

    KLTcpServer server;
    server.InitSocket();
    server.Bind("127.0.0.1", 6551);
    server.Listen(5);
    server.Start();
    server.StartThread();

    std::cout << "Server started. Listening on port 8888..." << std::endl;
    std::cout << "Press Enter to exit..." << std::endl;
    std::cin.get();

    server.Close();
    std::cout << "Server stopped." << std::endl;

    return 0;
}